﻿using MediatR;
using System.CJL.API.Application.Command.ProcessCommand;
using System.CJL.Domain;
using System.CJL.Infrstructre.Interface;

namespace System.CJL.API.Application.CommandHanlder.ProcessCommandHanler
{
    /// <summary>
    /// 返填
    /// </summary>
    public class ProcessMondelCommandHandler : IRequestHandler<ProcessMondelCommand,Process>
    {
        IProcessRepository _repository;
        /// <summary>
        /// 构造函数
        /// </summary>
        public ProcessMondelCommandHandler(IProcessRepository repository)
        {
            _repository = repository;
        }

        public async Task<Process> Handle(ProcessMondelCommand request, CancellationToken cancellationToken)
        {
            return await _repository.GetMondel(request.id);
        }
    }
}
